<?php
$c['db'] = function ($c) {
    return new Zend\Db\Adapter\Adapter($c['dbconf']);
};

$c['Review\Table\Node'] = $c->factory(function ($c) {
    return new Zend\Db\TableGateway\TableGateway('review_node', $c['db']);
});
$c['Review\Table\NodeTags'] = $c->factory(function ($c) {
    return new Zend\Db\TableGateway\TableGateway('review_node_tags', $c['db']);
});
$c['Common\Table\User'] = $c->factory(function ($c) {
    return new Zend\Db\TableGateway\TableGateway('ya_user', $c['db']);
});

$c['Task\Table\Project'] = $c->factory(function ($c) {
    return new Zend\Db\TableGateway\TableGateway('task_project', $c['db']);
});
$c['Task\Table\Group'] = $c->factory(function ($c) {
    return new Zend\Db\TableGateway\TableGateway('task_group', $c['db']);
});
$c['Task\Table\Todo'] = $c->factory(function ($c) {
    return new Zend\Db\TableGateway\TableGateway('task_todo', $c['db']);
});
$c['Task\Table\Note'] = $c->factory(function ($c) {
    return new Zend\Db\TableGateway\TableGateway('task_todo_note', $c['db']);
});
$c['Task\Table\Tag'] = $c->factory(function ($c) {
    return new Zend\Db\TableGateway\TableGateway('task_tag', $c['db']);
});

$c['Blue\Table\Term'] = $c->factory(function ($c) {
    return new Zend\Db\TableGateway\TableGateway('blue_terms', $c['db']);
});
$c['Blue\Table\TermTaxonomy'] = $c->factory(function ($c) {
    return new Zend\Db\TableGateway\TableGateway('blue_term_taxonomy', $c['db']);
});
$c['Blue\Table\Node'] = $c->factory(function ($c) {
    return new Zend\Db\TableGateway\TableGateway('blue_nodes', $c['db']);
});
$c['Blue\Table\NodeTaxonomy'] = $c->factory(function ($c) {
    return new Zend\Db\TableGateway\TableGateway('blue_node_taxonomy', $c['db']);
});
$c['Blue\Table\NodeMeta'] = $c->factory(function ($c) {
    return new Zend\Db\TableGateway\TableGateway('blue_node_meta', $c['db']);
});

$c['Jokes\Table\Joke'] = $c->factory(function($c){
    return new Zend\Db\TableGateway\TableGateway('jokes', $c['db']);
});
$c['Jokes\Table\JokeImage'] = $c->factory(function($c){
    return new Zend\Db\TableGateway\TableGateway('joke_images', $c['db']);
});
$c['Jokes\Table\User'] = $c->factory(function ($c) {
    return new Zend\Db\TableGateway\TableGateway('joke_user', $c['db']);
});


$c['Articles\Table\Article'] = $c->factory(function($c){
    return new Zend\Db\TableGateway\TableGateway('blog_article', $c['db']);
});
$c['Articles\Table\ArticleAddon'] = $c->factory(function($c){
    return new Zend\Db\TableGateway\TableGateway('blog_article_addon', $c['db']);
});